package hw04.grammar.productions;

import java.util.LinkedList;
import java.util.List;

import hw04.grammar.terminals.Comma;
import hw04.grammar.terminals.If;

public class PartialSugoals {
	
	private List<Object> value = new LinkedList<Object>();
	
	public PartialSugoals(If _, EDB edb) {
		value.add(edb);
	}
	
	public PartialSugoals(PartialSugoals ppl, Comma _, EDB edb) {
		value.addAll(ppl.getValue());
		value.add(edb);
	}
	
	public PartialSugoals(If _, IDB idb) {
		value.add(idb);
	}
	
	public PartialSugoals(PartialSugoals ppl, Comma _, IDB idb) {
		value.addAll(ppl.getValue());
		value.add(idb);
	}
	
	public List<Object> getValue() {
		return value;
	}
	
	@Override
	public String toString() {
		return getClass().getSimpleName() + ":" + getValue().toString();
	}

}
